import axios from 'axios'
const server = axios.create({
    baseURL:'',
    timeout:3333333
})

server.interceptors.request.use(config => {
    return config
},err => {
    Promise.reject(err)
})

server.interceptors.request.use(res => {
    return res
},err => {
    switch(err.status){
        case 404 : console.log('页面找不到了');break;
        case 500 : console.log('服务器错误');break;
        default: Promise.reject(err); break
    }
})

export default server